package com.example.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

@ConfigurationProperties(prefix ="pre" )
public class TestProperties {

    private String value1;

    private String value2="1212";

    @NestedConfigurationProperty
    private NetProperties netProperties=new NetProperties();

    @NestedConfigurationProperty
    private NetP netP=new NetP();

    public NetP getNetP() {
        return netP;
    }

    public void setNetP(NetP netP) {
        this.netP = netP;
    }

    public NetProperties getNetProperties() {
        return netProperties;
    }

    public void setNetProperties(NetProperties netProperties) {
        this.netProperties = netProperties;
    }

    public String getValue1() {
        return value1;
    }

    public void setValue1(String value1) {
        this.value1 = value1;
    }

    public String getValue2() {
        return value2;
    }

    public void setValue2(String value2) {
        this.value2 = value2;
    }


    public static class NetP{
        private String neStr="wew";

        public String getNeStr() {
            return neStr;
        }

        public void setNeStr(String neStr) {
            this.neStr = neStr;
        }
    }
}
